﻿<Window x:Class="Infrastructure.InteractionRequests.DefaultWindows.DefaultNotificationWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"     
            xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"    
             Width="300" Height="150" 
             Title="{Binding Title}"
             x:Name="notificationWindow" WindowStyle="SingleBorderWindow" ResizeMode="NoResize" ShowInTaskbar="False">

    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ContentControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0"
                        ContentTemplate="{Binding NotificationTemplate, ElementName=notificationWindow}"
                        Content="{Binding Content}"/>

        <Button x:Name="OKButton" Content="OK" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="Click">
                    <ei:CallMethodAction TargetObject="{Binding ElementName=notificationWindow}" MethodName="Close"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </Button>
    </Grid>
</Window>
